package system

import (
	"fresh-shop-gin/controller"

	"github.com/gin-gonic/gin"
)

type UserRouter struct{}

func (u *UserRouter) InitUserLogin(r *gin.RouterGroup) {
	userController := controller.ApiGroupApp.SystemApiGroup.UserController
	userRouter := r.Group("/user")
	{
		userRouter.POST("/login", userController.Login)
		userRouter.POST("/register", userController.Register)
	}
}

func (u *UserRouter) InitUserPrivate(r *gin.RouterGroup) {
	userController := controller.ApiGroupApp.SystemApiGroup.UserController
	userRouter := r.Group("/user")
	{
		userRouter.GET("/list", userController.GetUserList)
	}
}
